package com.example.demo.Service.impl;

import com.example.demo.Dao.SysRoleMapper;
import com.example.demo.Entity.SysRole;
import com.example.demo.Service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.management.relation.Role;
import java.util.List;

@Service
public class SysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Override
    public List<SysRole> getRolesByUserId(Integer id) {
        return sysRoleMapper.getRolesByUserId(id);
    }

    @Override
    public void addUser(Integer id) {
        sysRoleMapper.addUser(id);
    }
}

